package cn.santi.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 我的预约表
 * @TableName s_appointment
 */
@TableName(value ="s_appointment")
@Data
public class SAppointment implements Serializable {
    /**
     * 预约表id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer uid;

    /**
     * 门店ID
     */
    private Integer shopid;

    /**
     * 包厢id
     */
    private Integer boxid;

    /**
     * 套餐名称
     */
    private String pkgname;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 开始时间
     */
    private String starttimestr;

    /**
     * 结束时间
     */
    private String endtimestr;

    /**
     * 提交时间，默认为当前时间
     */
    private String submittime;

    /**
     * 预约状态{0未支付,1:已支付未消费,2:使用中,3:消费完成,4:已取消,9:全部订单}
     */
    private String appointmentstatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SAppointment other = (SAppointment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getShopid() == null ? other.getShopid() == null : this.getShopid().equals(other.getShopid()))
            && (this.getBoxid() == null ? other.getBoxid() == null : this.getBoxid().equals(other.getBoxid()))
            && (this.getPkgname() == null ? other.getPkgname() == null : this.getPkgname().equals(other.getPkgname()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getStarttimestr() == null ? other.getStarttimestr() == null : this.getStarttimestr().equals(other.getStarttimestr()))
            && (this.getEndtimestr() == null ? other.getEndtimestr() == null : this.getEndtimestr().equals(other.getEndtimestr()))
            && (this.getSubmittime() == null ? other.getSubmittime() == null : this.getSubmittime().equals(other.getSubmittime()))
            && (this.getAppointmentstatus() == null ? other.getAppointmentstatus() == null : this.getAppointmentstatus().equals(other.getAppointmentstatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getShopid() == null) ? 0 : getShopid().hashCode());
        result = prime * result + ((getBoxid() == null) ? 0 : getBoxid().hashCode());
        result = prime * result + ((getPkgname() == null) ? 0 : getPkgname().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getStarttimestr() == null) ? 0 : getStarttimestr().hashCode());
        result = prime * result + ((getEndtimestr() == null) ? 0 : getEndtimestr().hashCode());
        result = prime * result + ((getSubmittime() == null) ? 0 : getSubmittime().hashCode());
        result = prime * result + ((getAppointmentstatus() == null) ? 0 : getAppointmentstatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uid=").append(uid);
        sb.append(", shopid=").append(shopid);
        sb.append(", boxid=").append(boxid);
        sb.append(", pkgname=").append(pkgname);
        sb.append(", price=").append(price);
        sb.append(", starttimestr=").append(starttimestr);
        sb.append(", endtimestr=").append(endtimestr);
        sb.append(", submittime=").append(submittime);
        sb.append(", appointmentstatus=").append(appointmentstatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}